import type {RouteRecordRaw} from "vue-router";
import LayoutCom from "@/views/LayoutCom.vue";

//
const baseRoutes: RouteRecordRaw[] = [
    {
        path: '/',
        name: 'Layout',
        component: LayoutCom,
        redirect: '/analytics',
        children: [
            {
                path: '/analytics',
                name: 'Analytics',
                component: () => import('@/views/overview/analytics/AnalyticsView.vue'),
                meta: {title: '分析页', icon: 'DataAnalysis'}
            },
            {
                path: '/workbench',
                name: 'Workbench',
                component: () => import('@/views/overview/workbench/WorkbenchView.vue'),
                meta: {title: '工作台', icon: 'Menu'}
            },
            {
                path: '/user',
                name: 'UserList',
                component: () => import('@/views/system/UserList.vue'),
                meta: {title: '用户列表', icon: 'User'}
            }, {
                path: '/notice',
                name: 'NoticeList',
                component: () => import('@/views/system/NoticeList.vue'),
                meta: {title: '公告列表', icon: 'Notification'}
            },
            {
                path: '/button',
                name: 'Button',
                component: () => import('@/views/example/ButtonCom.vue'),
                meta: {title: '按钮', icon: 'SwitchButton'}
            }
        ]
    },
    {
        path: '/login',
        name: 'Login',
        component: () => import('@/views/login/LoginView.vue'),
        meta: {title: 'Login'}
    },
    {
        path: '/register',
        name: 'Register',
        component: () => import('@/views/register/RegisterView.vue'),
        meta: {title: 'Register'}
    },
    {
        path: '/:pathMatch(.*)*',
        name: 'NotFound',
        component: () => import('@/views/NotFoundView.vue'),
        meta: {title: '404'}
    },
]

export default baseRoutes